package com.kingsoft.dc.khaos.metadata

/**
  * Created by chengguangqing on 2019/5/31.
  */
case class Dependency(sourceNode: String = null,
                      var sourceSeq: String = "0",
                      targetNode: String = null,
                      var targetSeq: String = "0",
                      var sourceTable:String = "notDependSourceModule") {

  /*获取源节点依赖信息*/
  def getSource(): Dependency = {
    Dependency(sourceNode, sourceSeq)
  }

  /*获取目标节点依赖信息//21202F2938212B3E22272626252E434D*/
  def getTarget(): Dependency = {
    Dependency(null, null, targetNode, targetSeq)
  }

  def getEdge():Dependency={
    Dependency(sourceNode, sourceSeq, targetNode, targetSeq)
  }

  def getTable():Dependency = {
    Dependency(null,null,null,null,sourceNode)
  }

  //create by 20190731
  def setSourceSeq(seq:String):Unit={
    sourceSeq = seq;
  }

  //create by 20190731
  def setTargetSeq(seq:String):Unit={
    targetSeq=seq
  }

  def setSourceTable(name:String):Unit= {
    sourceTable = name
  }
}
